<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <title>退款</title>
    <link rel="stylesheet" href="/Public/Home/css/memberOrder.css">
    <!--不识别数字为手机-->
<meta name="format-detection" content="telephone=no, email=no"/>
<!--通用js-->
<?php if(isset($signPackage) && !empty($signPackage)){ ?>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js?v=201704270010"></script>
<?php } ?>
<script type="text/javascript" src="/Public/Home/js/require.js"></script>
<script type="text/javascript" src="/Public/Home/js/baseLoading.js?v=201705240001"></script>
<script src="/Public/Home/js/jquery.min.js" ></script>
<script src="/Public/Home/js/pincode-input.js" ></script>
<script src="/Public/Home/js/parabola.js" ></script>
<script src="/Public/Home/js/lazyload/jquery.lazyload.min.js"></script>
<script type="text/javascript">
    _global.isLogin = !!"<?php echo $wx_member_id; ?>";
	var isWxShareDiy = typeof yc_share_diy === "undefined" ? false : yc_share_diy;
	var yc_wx_shareImgPath = "";
	<?php if(isset($weixin_logo) && !empty($weixin_logo)){ ?>
		yc_wx_shareImgPath = "/Uploads/<?php echo ($weixin_logo["image"]); ?>";
	<?php } ?>
    var yc_pass_arr = {'local_id':"<?php echo I('local_id',1);?>",'top_local_id':"<?php echo I('top_local_id',1);?>"};
	if(parseInt(yc_pass_arr["local_id"]) == 21){
		_global.isStopSell = true;
	}
    <?php if(isset($signPackage) && !empty($signPackage)){ ?>
        _global.isWeiXinLoad = true;
        var isEnableLocation = typeof yc_wx_location === "undefined" ? false : yc_wx_location;
        var yc_wx_options = {
            "enableLocation" : isEnableLocation,
            "refuseCallback" : function(){},
            "mapCallback" : function(){},
            "config" : {
                debug: false,
                appId: '<?php echo $signPackage["appId"];?>',
                timestamp: '<?php echo $signPackage["timestamp"];?>',
                nonceStr: '<?php echo $signPackage["nonceStr"];?>',
                signature: '<?php echo $signPackage["signature"];?>',
                jsApiList: [
                    'checkJsApi'
                ]
            }
        };
        var isInHeader = typeof yc_wx_useInHeader === "undefined" ? true : yc_wx_useInHeader;
        if(isInHeader){
            wxAutoConfig(yc_wx_options);
        }
    <?php } ?>
</script>
</head>
<style>
    .warp .old-price {
        position: absolute;
        left: 0.2rem;
        top:1rem;
        font-size: 0.24rem;
        color: #919896;
        text-decoration: line-through;
    }
</style>
<body>
<div class="warp">
    <!--退款top-->
    <div class="member-refund-top">
        <i></i>
        <ul class="">
            <li class="active"><span>填写退款</span></li>
            <li><span>受理确认</span></li>
            <li><span>完成退款</span></li>
        </ul>
    </div>
    <!--退款金额操作-->
    <input id="order_id" type="hidden" value="<?php echo ($orderMsg['order_id']); ?>" />
    <div class="member-refund-price mgTop">
        <label>退款金额：</label>
        <input id="price" class="drawback-txt" type="text" value="<?php echo ($orderMsg["total_amount"]); ?>"  />
        <input id="max-back-price" type="hidden" value="<?php echo ($orderMsg["total_amount"]); ?>"/>
        <span class="drawback-tip">最大可退款金额：<em><?php echo ($orderMsg["total_amount"]); ?>元</em></span>
    </div>
    <!--退款商品列表-->

    <div class="refund-goods-list mgTop">

        <?php if(is_array($goodsMsg)): foreach($goodsMsg as $key=>$v): if($v['nums']-$v['refund_goods_num'] != 0): ?><div class="single-item dataItem" data-id="<?php echo ($v["item_id"]); ?>" data-num="<?php echo $v['nums']-$v['refund_goods_num'];?>" data-price="<?php echo ($v["price"]); ?>">
                    <div class="swipe-item">
                        <a href="<?php echo url('goods/detail',['id'=>$v['store_pid']]);?>" class="img"><img src="<?php echo (getthumb($v["goods_id"])); ?>"></a>
                        <div class="goods-text">
                            <a href="<?php echo url('goods/detail',['id'=>$v['store_pid']]);?>" class="name"><?php echo ($v["name"]); ?></a>
                            <p class="old-price">¥<?php echo ($v["g_price"]); ?></p>
                            <p class="price" id="goods_value" value="<?php echo ($v["price"]); ?>">¥<?php echo ($v["price"]); ?></p>
                            <p class="change-number">
                                <a href="javascript:void(0);" class="plus">+</a>
                                <input type="text" value="<?php echo $v['nums']-$v['refund_goods_num'];?>" class="goods_number">
                                <a href="javascript:void(0);" class="minus">-</a>
                            </p>
                        </div>
                    </div>
                    <div class="static-item">
                        <div class="choice-btn"></div>
                    </div>
                </div><?php endif; endforeach; endif; ?>
        <div id="freight" class="single-item single-refund-item" data-fee="<?php echo ($orderMsg['cost_freight']); ?>">
            <div class="swipe-item">
                <span class="single-refund-price">退运费&nbsp;¥<?php echo ($orderMsg['cost_freight']); ?><span class="sp-ommit">（退运费请先与客服联系）</span></span>
            </div>
            <div class="static-item">
                <div class="choice-btn"></div>
            </div>
        </div>
    </div>

    <!--退款原因-->
    <div class="refund-mes-form feedback mgTop">
        <h4>退款原因</h4>
        <div class="select-template mgTop">
            <input id="refundReason" type="text" placeholder="成分与商品描述不符" />
            <i></i>
        </div>
        <h4 class="mgTop">备注说明(可不填)</h4>
        <textarea id="refundComment" placeholder="请输入其他说明" class="mgTop"></textarea>
        <p class="mgTop"><a href="#" class="btn btn-second btn-block btn-refund-tps">申请退款</a></p>
    </div>
</div>
<!-- 绑定手机弹窗 -->
<!--<div class="alert-popup member-refund-tips" style="display: none">
    <p>选择订单中部分商品退款后，未满足59元免运费，将自动扣除5元免运金额。</p>
    <p><a href="javascript:void(0);" style="width: 100%" class="confirm">知道了</a></p>
</div>-->
<input type="hidden" id="sell" value="<?php echo ($sell); ?>">
<script>
    require(['memberRefundGoods'])
</script>
</body>
</html>